<link rel="stylesheet" href="/Css/jquery.cluetip.css" />
<script type="text/javascript" src="/Js/jquery.cluetip.js"></script>

<div class="pad-10" >
    
    <div class="navigate">
        <h1>
            当前位置：

            <a href="/index.php" target="_parent">首页</a>
            &gt;

            <a href="/index.php/Admin/Task/" target="_self">任务列表</a>
        </h1>

        <span class="ui-button ui-button-morange fr">
            <a href="/index.php/Admin/Task/add" class="ui-button-text fr">添加任务</a>
        </span>

  	</div>




    <div class="searchbox">
    	<form id="form_task" action="/index.php/Admin/Task/" method="get">

        <label class="ui-form-label">查询日期:</label>

        <div class="ui-form-item-content">
 		<input type="text" class="Wdate tc" id="begin" name="begin_time" onclick="javascript:WdatePicker()" readonly="readonly" value="{$begin_time}" />
    	至
    	<input type="text" class="Wdate tc" id="end" name="end_time" onclick="javascript:WdatePicker()" readonly="readonly" value="{$end_time}" />
        </div>


        <label class="ui-form-label">平台:</label>
        <div class="ui-form-item-content">
    	<select name="plantform_id" id="plantform_id" class="form-select" style="width:80px;">
    		<option value="0">不限</option>
				<volist name="plantforms" id="p">
				<option value="{$p.plantform_id}"<if condition="$p['plantform_id'] eq $plantform_id"> selected</if>>{$p.plantform_name}</option>
				</volist>
        </select>
        </div>


        <label class="ui-form-label">店名:</label>
        <div class="ui-form-item-content">
		<select name="user_id" id="user_id" class="form-select">
			<option value="-99">不限</option>
			<volist name="users" id="u">
			<option value="{$u.user_id}" <if condition="$u['user_id'] eq $user_id"> selected</if>>[{$u.user_id}]&nbsp;[{$u.plantform_name}]&nbsp;[{$u.shop_name}]&nbsp;{$u.user_name}</option>
			</volist>
        </select>
        </div>

        <label class="ui-form-label">支付状态:</label>
        <div class="ui-form-item-content">
		<select name="pay_status_id" id="pay_status_id" class="form-select">
			<option value="-99">不限</option>
			<volist name="task_pay_status" id="s">
			<option value="{$s.id}" <if condition="$s['id'] eq $pay_status_id"> selected</if>>{$s.name}</option>
			</volist>
        </select>
        </div>

        <label class="ui-form-label">任务状态</label>
        <div class="ui-form-item-content">
		<select name="task_status_id" id="task_status_id" class="form-select">
			<option value="-99">不限</option>
			<volist name="task_status" id="s">
			<option value="{$s.id}" <if condition="$s['id'] eq $task_status_id"> selected</if>>{$s.name}</option>
			</volist>
        </select>
        </div>

            <div class="ui-button ui-button-morange">
                <input type="submit" seed="CR-filter" value="搜 索" class="ui-button-text" id="btnSearch">
            </div>

        </form>
	</div>
	  	

	<if condition="$task_summary_has_role">
	<!-- 费用汇总 -->
	<div class="explain-col">
		<table>
			<tr>
				<td class="w200 tc">总任务量:<span class="red">{$summary.order_count}</span></td>
				<td class="w200 tc">总代付费:<span class="red">{$summary.task_order_money}</span></td>
				<td class="w200 tc">总手续费:<span class="red">{$summary.commission_money}</span></td>
				<td class="w200 tc">总快递信息费:<span class="red">{$summary.value_added_money}</span></td>
				<td class="w200 tc">总支付费:<span class="red">{$summary.total_money}</span></td>
			</tr>
		</table>
	</div>
	<!-- 费用汇总 -->		
	</if>		

    <div class="table-list">
    <table width="100%" cellspacing="0">
        <thead>
            <tr>
            	<th class="w60">任务单号</th>
                <th class="w120">添加时间</th>
                
                <th class="w80">开始时间</th>
                <th class="w80">结束时间</th>
                <th>平台</th>
                <th>店名</th>
                <th>添加人</th>
                <th>已完成/任务量</th>
                <th>支付总费用</th>
                <th>支付状态</th>
                <th>任务状态</th>
                <th>操作</th>
            </tr>
        </thead>
    	<tbody>
        <volist name="tasks" id="t">
        <tr class="<eq name="mod" value="0">bg-lightgray</eq>">
        	<td align="center"<gt name="t.exception_count" value="0"> title="异常订单{$t.exception_count}个" class="bg-red"</gt>>
        		
        		<a class="jt" href="/index.php/Admin/Task/batch_order_list?id={$t.task_id}" rel="/index.php/Admin/Task/task_log?id={$t.task_id}" title="" target="_blank">
        		{$t.task_id}
        		</a>
        		
        	
        	</td>
        	<td align="center">{$t.created}</td>
        	
        	<td align="center">{$t.begin_time}</td>
        	<td align="center">{$t.end_time}</td>
        	
        	
        	<td align="center">{$t.plantform_name}</td>
        	<td align="center">{$t.shop_name}</td>
        	<td align="center">{$t.business_admin_name}</td>
        	<td align="center">{$t.finish_count} / {$t.order_count}</td>
        	
        	<td align="right">
        	{$t.total_money}
        	</td>
     		<td align="center">
            	{$t.pay_status_name}
            </td>
            <td align="center">
            	{$t.task_status_name}
            </td>
            <td align="center">
                <a href="/index.php/Admin/Task/batch_order_list?id={$t.task_id}" target="_blank">查看</a>
            	&nbsp;|&nbsp;
            	<a href="/index.php/Admin/Task/detail?id={$t.task_id}" target="_self">修改</a>
            	&nbsp;|&nbsp;
            	<a href="/index.php/Admin/Task/export_csv?id={$t.task_id}" target="_self">导出</a>
            </td>
        </tr>
        </volist>
    	</tbody>
    </table>

    </div>
    
</div>

<script type="text/javascript" src="/Js/adm/task/index.js"></script>
<script type="text/javascript" src="/Js/WdatePicker.js"></script>